import { observer } from "mobx-react";
import Dialog from ".";
import { WeaLocaleProvider,WeaTable } from 'ecCom';
import { Spin } from 'antd';
const getLabel = WeaLocaleProvider.getLabel;


@observer
export default class DynamicNodePreviewDialog extends React.Component {

    

    render() {
        const { store } = this.props;
        const title = getLabel('528155','节点信息');
        const columnsLabel = new Map([
            ['节点名称',  getLabel('528156','节点名称')],
            ['操作者', getLabel('528157','操作者')]
        ]);
        store.setTitle(title);
        store.setColumns(columnsLabel);
        return (
            <Dialog ecId={`${this && this.props && this.props.ecId || ''}_Dialog@emy6y8`}
                dialog={store}
            >
            {store.loading ? <div style={{ textAlign: 'center', paddingTop: '150px' }}><Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@un6gal`} size="large" tip={'解析中...'} /></div>:       
            <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@iay0l5`} columns={store.columns} dataSource={store.dataSource} pagination={store.pagination} childrenColumnName="subList"/>}
            </Dialog>
        )
    }




}